home *** CD-ROM | disk | FTP | other *** search
/ CD-ROM Today - The Disc! 5 / CD-ROM Today - The Disc (Issue 5)(November 1994).ISO / mac / DHA demo / Don Norman Folder / The Library / The Library.rsrc / CSTR_29336_fillgResourcePathsCSTR < prev    next >
Text File  |  1994-09-21  |  1KB  |  40 lines

  1. global gLookInBookFolder, gResourceFolderName, gResourcePaths
  2. put getstackpath() into gsp
  3. if ((last char of gResourceFolderName¡":") and (gResourceFolderName ¡ "")) then
  4. put ":" after gResourceFolderName
  5. end if
  6. if gLookInBookFolder = "true" then
  7. if gResourceFolderName = "" then
  8. put gsp into gResourcePaths
  9. else if gResourceFolderName ¡ "" then
  10. if gResourceFolderName = gsp then
  11. put "" into gResourceFolderName
  12. put gsp into gResourcePaths
  13. else
  14. put the itemdelimiter into id
  15. set the itemdelimiter to ":"
  16. put gResourceFolderName into gf
  17. repeat while the number of items in gf > 1
  18. delete item 1 of gf
  19. end repeat
  20. set the itemdelimiter to id
  21. if (gf¡"") then
  22. put gsp&gf into gResourcePaths
  23. put gResourcePaths&return&listAllFolders(gResourcePaths) into gResourcePaths
  24. end if
  25. end if
  26. end if
  27. else if gLookInBookFolder = "false" then
  28. if gResourceFolderName = "" then
  29. put gsp into gResourcePaths
  30. else
  31. put gResourceFolderName into gResourcePaths
  32. if (gResourcePaths¡"") then
  33. put gResourcePaths&return&listAllFolders(gResourcePaths) into gResourcePaths
  34. end if
  35. end if
  36. else
  37. put "true" into gLookInBookFolder
  38. put "" into gResourceFolderName
  39. put gsp into gResourcePaths
  40. end if